<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../tpl/head.jsp"%>
<link rel="stylesheet" href="statics/css/secondarytitle.css">
<link rel="stylesheet" href="statics/css/ExportBusiness/tpl/newupoffer.css">
<style>
    /* 防止下拉框的下拉列表被隐藏---必须设置--- 此样式和表格的样式有冲突 如果表格列数太多 会出现错乱的情况 目前我的解决方法是忽略下拉框的美化渲染 <select lay-ignore> */
   /* .layui-table-cell {
        overflow: visible;
    }

    .layui-table-box {
        overflow: visible;
    }

    .layui-table-body {
        overflow: visible;
    }
    !* 设置下拉框的高度与表格单元相同 *!
    td .layui-form-select{
        margin-top: -10px;
        margin-left: -15px;
        margin-right: -15px;
    }*/
</style>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="header">
            <img class="img " src="statics/images/titheader.svg">
            <span>增加，修改出运计划</span>
        </div>
        <div class="layui-card-body">
            <form class="layui-form" action="" lay-filter="editor-form">
                <input type="text" name="id" value="" style="display: none"/>
                <dl class="layui-row sk_row">
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>计划编号</text>
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="shipmentNo" autocomplete="off" class="layui-input" lay-verify="required"></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>客户名称</text>
                        </div>
                        <div class="layui-col-xs8"> <input type="text" name="customerCode" autocomplete="off" class="layui-input" id="customerCode" ></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            联系人
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="contactPerson" autocomplete="off" class="layui-input"></div>
                    </dd>

                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>出运日期</text>
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="shipmentDate" id="shipmentDate" lay-verify="required|date" autocomplete="off" class="layui-input starttime" placeholder="年 - 月 - 日">
                        </div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            币种
                        </div>
                        <div class="layui-col-xs8"> <select name="currency" disabled id="currency" lay-filter="currency">
                            <option value=""></option>
                            <!-- <option value="text1">text1</option>-->
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            美元汇率
                        </div>
                        <div class="layui-col-xs8"> <input type="text" readonly name="usdRate" autocomplete="off" class="layui-input" ></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            人民币汇率
                        </div>
                        <div class="layui-col-xs8"><input type="text" readonly name="rmbRate" autocomplete="off" class="layui-input"></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            起运地
                        </div>
                        <div class="layui-col-xs8"> <select lay-search name="startPlace" id="place" lay-filter="place">
                            <option value=""></option>
                            <!-- <option value="text1">text1</option>-->
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>目的地</text>
                        </div>
                        <div class="layui-col-xs8"><select lay-search name="endPlace" id="destination" lay-filter="destination" lay-verify="required">
                            <option value=""></option>
                            <!-- <option value="text1">text1</option>-->
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            运抵国家
                        </div>
                        <div class="layui-col-xs8">
                            <select lay-search name="targetCountry" id="targetCountry" lay-filter="targetcountry">
                                <%-- <option value="1">是</option>
                                 <option value="0">否</option>--%>
                            </select>
                        </div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            是否报关
                        </div>
                        <div class="layui-col-xs8">
                            <select lay-search name="transhipment" id="transhipment" lay-filter="transhipment">
                                <option value="1">是</option>
                                <option value="0">否</option>
                            </select>
                        </div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            运输方式
                        </div>
                        <div class="layui-col-xs8"><select lay-search name="transMode" id="transMode" lay-filter="transmode">
                            <option value=""></option>
                            <!-- <option value="text1">text1</option>-->
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>预收款类型</text>
                        </div>
                        <div class="layui-col-xs8"><select lay-search name="paymentTerm" id="paymentTerm" lay-filter="termspayment">
                            <option value=""></option>
                            <!-- <option value="text1">text1</option>-->
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>价格术语</text>
                        </div>
                        <div class="layui-col-xs8"><select lay-search name="priceTerm" id="priceTerm" lay-filter="priceterms" lay-verify="required" disabled="disabled">
                            <option value=""></option>
                            <!--<option value="text1">text1</option>-->
                        </select></div>
                    </dd>
<Rolue:operate operateID="shipmentplan_newupshipmentplan" roleID="shipmentplan_newupshipmentplan" mark="测试 ">
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            发票总额
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="invoiceAmount" autocomplete="off" class="layui-input" lay-verify="number"></div>
                    </dd>
</Rolue:operate>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            制单日期
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="makeTime" id="makeTime" lay-verify="date" autocomplete="off" class="layui-input starttime" placeholder="年 - 月 - 日">
                        </div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            销售合同号
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="salesContractNo" autocomplete="off" class="layui-input"></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            客户合同号
                        </div>
                        <div class="layui-col-xs8"><input class="layui-input" type="text"  name="customerContractNo" autocomplete="off"></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>业务员</text>
                        </div>
                        <div class="layui-col-xs8">
                            <select lay-search name="salesmanCode" id="salesmanCode" lay-filter="salesmanFilter">
                                <option value=""></option>
                            </select>
                            <input type="hidden" name="salesmanName" id="salesmanName">
                        </div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>业务模式</text>
                        </div>
                        <div class="layui-col-xs8"><select lay-search name="businessMode" id="businessMode" lay-filter="businessmodel">
                            <option value=""></option>
                            <!-- <option value="text1">text1</option>-->
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            货好日期
                        </div>
                        <div class="layui-col-xs8"> <input type="text" name="proFinishDate" id="proFinishDate" lay-verify="date" autocomplete="off" class="layui-input starttime" placeholder="年 - 月 - 日">
                        </div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            品牌
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="brand" autocomplete="off" class="layui-input"></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            仓库
                        </div>
                        <div class="layui-col-xs8"> <select lay-search name="stock" id="stock" lay-filter="stock" >
                            <option value=""></option>
                        </select></div>
                    </dd>
<%--                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">--%>
<%--                        <div class="layui-col-xs4 text-right padding-right height-large">--%>
<%--                            箱型--%>
<%--                        </div>--%>
<%--                        <div class="layui-col-xs8"> <input type="text" name="boxType" autocomplete="off" class="layui-input"></div>--%>
<%--                    </dd>--%>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>货柜型号</text>
                        </div>
                        <div class="layui-col-xs8">
                            <select lay-search name="containerTypeCode" id="containerTypeCode" lay-filter="containerTypeCode">
                                <option value=""></option>
                            </select>
                            <input type="hidden" name="containerType" id="containerType">
                        </div>
                    </dd>

                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>客户账期</text>
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="payDay" autocomplete="off" class="layui-input" lay-verify="required|number"></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>报关抬头</text>
                        </div>
                        <div class="layui-col-xs8"><select lay-search name="declareCompany" id="declareCompany" lay-filter="signingcompany" lay-verify="required">
                            <option value=""></option>
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>签约公司</text>
                        </div>
                        <div class="layui-col-xs8"><select lay-search name="companyCode" id="companyCode" lay-filter="signingcompany" lay-verify="required" disabled>
                            <option value=""></option>
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            银行
                        </div>
                        <div class="layui-col-xs8">
                            <select lay-search name="bankCode" id="bankCode" lay-filter="bank">
                                <option value=""></option>
                                <!--  <option value="text1">text1</option> -->
                            </select>
                        </div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>客户等级名称</text>
                        </div>
                        <div class="layui-col-xs8">
                            <input type="text" name="customerLevelName" autocomplete="off" class="layui-input" id="customerLevelName" >
                        </div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6 customerLevelCodeHin">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>客户等级编码</text>
                        </div>
                        <div class="layui-col-xs8">
                            <input type="text" name="customerLevelCode" autocomplete="off" class="layui-input" id="customerLevelCode" >
                        </div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>操作员</text>
                        </div>
                        <div class="layui-col-xs8">
                            <input type="text" readonly name="executorName" id="executorName" autocomplete="off" class="layui-input">
                            <input type="hidden" name="executorCode" id="executorCode">
                        </div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>货柜数量</text>
                        </div>
                        <div class="layui-col-xs8">
                            <input type="number" name="containerNum" id="containerNum" autocomplete="off" class="layui-input" onblur="isContainerNum()">
                        </div>
                    </dd>
                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            <text>是否走信保订单</text>
                        </div>
                        <div class="layui-col-xs8">
                            <select lay-search name="whetherCreditGuarantee" id="whetherCreditGuarantee" disabled>
                                <option value=""></option>
                                <option value="1">是（采购抬头：上海沣奇）</option>
                                <option value="2">是（采购抬头：上海源铢）</option>
                                <option value="0">否</option>
                            </select>
                        </div>
                    </dd>

                    <dd class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                        <div class="layui-col-xs4 text-right padding-right height-large">
                            信保订单金额USD
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="creditGuaranteeAmount" autocomplete="off" disabled class="layui-input"></div>
                    </dd>

                </dl>
                <div class="layui-row">
                    <div class="layui-col-xs12">
                        <div class="layui-tab layui-tab-card">
                            <ul class="layui-tab-title">
                                <li class="layui-this">产品</li>
                                <li class="">费用</li>
                                <li class="">附件</li>
                                <li class="" id="logLi">日志</li>
                            </ul>
                            <div class="layui-tab-content">
                                <div  class="layui-tab-item  layui-show">
                                    <table class="layui-table" id="storageproducts" lay-filter="storageproductstable"></table>

                                    <div class="layui-tab layui-tab-card" id="hidden">
                                        <ul class="layui-tab-title">
                                            <li class="layui-this">产品规格配件</li>
                                        </ul>
                                        <div class="layui-tab-content">
                                            <div class="layui-tab-item layui-show">
                                                <table class="layui-table" id="productsaselect" lay-filter="productsatable"></table>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-tab-item">
                                    <table class="layui-table" id="cost" lay-filter="costtable"></table>
                                </div>
                                <div class="layui-tab-item">
                                    <table class="layui-table" id="attachment" lay-filter="attachmenttable"></table>
                                </div>
                                <div class="layui-tab-item"><table class="layui-table" id="otherwarehouselog" lay-filter="logtable"></table></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="padding text-right">
                    <button type="button" class="layui-btn" lay-submit=""  lay-filter="form-element" id="submitT">提交</button>
                    <button type="button" class="layui-btn" lay-submit=""  lay-filter="form-element-save">保存</button>
                </div>
            </form>

        </div>
    </div>
</div>

<div class="layui-upload" id="attachmentupload" style="display: none;padding: 10px">
    <a type="button" class="layui-btn layui-btn-normal" id="uploadfile">选择文件</a>
    <div class="layui-upload-list">
        <table class="layui-table">
            <thead>
            <tr><th>文件名</th>
                <th>大小</th>
                <th>状态</th>
                <th>操作</th>
            </tr></thead>
            <tbody id="uploadlist"></tbody>
        </table>
    </div>
    <a type="button" class="layui-btn" id="testListAction">开始上传</a>
</div>
<script type="text/html" id="imgTpl">
    <img src="ftp/downloadimg2?url={{d.img}}" data-id="{{d.id}}" class="btn_productimg" onerror="this.src='statics/images/layui-logo.jpg';this.onerror=null" alt="产品图片" style="max-width:70px;max-height: 28px;">
</script>

<script type="text/html" id="productcodeselect">
    <div class="layui-input-inline">
        <div class="layui-form-select ySearchSelect y_{{d.id}}" data-id="{{d.id}}">
            <div class="layui-input">{{d.productcode==undefined?"":d.productcode}}</div>
            <i class="layui-edge"></i>
            <table class="layui-table zdy" id="productcodeselect_{{d.id}}" lay-filter="productcodeselecttable_{{d.id}}"></table>
        </div>
    </div>
</script>

<script type="text/html" id="unitselect">
    <select name="unitselect" lay-filter="unitselect_filter">
        <option value="{{d.unit}}">{{d.unit==undefined?"":d.unit}}</option>
        <!--<option value="text1">text1</option>
        <option value="text2">text2</option>-->
    </select>
</script>

<script type="text/html" id="costtypeselects">
    <select name="costType" class="costTypeClass" id="costType_{{d.contractId}}" lay-filter="costType_filter" lay-search>
        <option value=""> </option>
    </select>
</script>

<script type="text/html" id="contractNoSelect">
    <select name="contractNo" class="contractNoClass" id="contractNo_{{d.contractId}}" lay-filter="contractNo_filter" lay-search>
        <option value=""> </option>
    </select>
</script>

<script type="text/html" id="costtoolbar">
    <a class="layui-btn layui-btn-normal" lay-event="new">增加费用</a>
    <a class="layui-btn layui-btn-danger" lay-event="del">删除</a>
    <span> 说明:（金额>0 为增加费用；金额<0 为扣减费用）</span>
</script>

<script type="text/html" id="storageproductstoolbar" >
    <a class="layui-btn" data-type="getCheckData" lay-event="importexport"  >导入外销</a>
    <a class="layui-btn" data-type="getCheckData" lay-event="importstockup"  >导入备货</a>
    <a class="layui-btn" data-type="getCheckData" lay-event="del">删除</a>
</script>
<script type="text/html" id="storageproductseditor">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<script type="text/html" id="attachmenttoolbar">
    <a class="layui-btn" data-type="getCheckData" lay-event="uploadfile">上传</a>
</script>
<script type="text/html" id="attachmenteditor">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="download">下载</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<script type="text/html" id="productsaup">
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="productsade">删除</a>
</script>
<script type="text/html" id="productsatoolbar">
    <a class="layui-btn layui-btn-sm" data-type="getCheckData" lay-event="new">添加</a>
    <a class="layui-btn layui-btn-sm layui-btn-danger"  lay-event="delet">删除</a>
</script>
<%@ include file="../../tpl/foot.jsp"%>
<script src="statics/js/bignumber.js"></script>
<script src="statics/js/ExportBusiness/tpl/newupshipmentplan.js"></script>